/**
 *******************************************************************************
 * @FileName  : led.c
 * @Author    : GaoQiu
 * @CreateDate: 2020-05-18
 * @Copyright : Copyright(C) GaoQiu
 *              All Rights Reserved.
 *******************************************************************************
 *
 * The information contained herein is confidential and proprietary property of
 * GaoQiu and is available under the terms of Commercial License Agreement
 * between GaoQiu and the licensee in separate contract or the terms described
 * here-in.
 *
 * This heading MUST NOT be removed from this file.
 *
 * Licensees are granted free, non-transferable use of the information in this
 * file under Mutual Non-Disclosure Agreement. NO WARRENTY of ANY KIND is provided.
 *
 *******************************************************************************
 */
#include "led.h"
#include "pan10x_gpio.h"
#include "board.h"

void BSP_InitAllLed(void)
{
	uint16_t gpio[] = {LED_PIN_RED, LED_PIN_GREEN, LED_PIN_BLUE};

	for(int i=0; i<COUNTOF(gpio); i++)
	{
		GPIO_Init(gpio[i], GPIO_Mode_PP_Out);
		GPIO_ResetBit(gpio[i]);
	}
}

void BSP_LedOn(uint16_t LED_Pin)
{
	GPIO_SetBit(LED_Pin);
}

void BSP_LedOff(uint16_t LED_Pin)
{
	GPIO_ResetBit(LED_Pin);
}

void BSP_LedToggle(uint16_t LED_Pin)
{
	GPIO_ToggleEx(LED_Pin);
}
